﻿using HelloWPF.Command.Command;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Documents;
using model = HelloWPF.Command.Models;

namespace HelloWPF.Command.ViewModel
{
    public class AnyEventBindingCommandViewModel
    {
       
        public CommandBase SelectionChangedCommand { get; set; }

        /// <summary>
        /// ctor
        /// </summary>
        public AnyEventBindingCommandViewModel()
        {
            SelectionChangedCommand = new CommandBase()
            {
                DoExecute = new Action<object>(SaySelectionChanged),
                DoCanExecute = new Func<object, bool>(CanSelectionChanged)
            };
            
        }

        public void SaySelectionChanged(object obj)
        {

        }

        public bool CanSelectionChanged(object obj)
        {
            return true;
        }


        public void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }
    }
}
